package com.gxa.admin.controller;

import com.gxa.common.vo.JsonResult;
import com.gxa.modules.pojo.Bank_Water;
import com.gxa.modules.service.BankWaterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.web.bind.annotation.*;

@RequestMapping("/BankWater")
@RestController
public class BankWaterController {
    @Autowired
    private BankWaterService bankWaterService;


    @GetMapping("/queryBankWater")
    @Cacheable(value = "queryBankWater" ,key = "#page+'-'+#limit")
    public JsonResult queryBankWater(Integer page,Integer limit){
      return  bankWaterService.queryBankWater(page,limit);
    }


    @PostMapping("/updataBankWater")
    public JsonResult updataBankWater( @RequestBody  Bank_Water bank_water){
        return  bankWaterService.updataBankWater(bank_water);
    }

    @PostMapping("/addBankWater")
    public JsonResult addBankWater( @RequestBody  Bank_Water bank_water){
        return  bankWaterService.addBankWater(bank_water);
    }

    @PostMapping("/delBankWater")
    public JsonResult delBankWater( @RequestBody  Bank_Water bank_water){
        return  bankWaterService.delBankWater(bank_water);
    }
}
